@import './variables.scss';
/**
  多行省略
  $lines  行数
 */
@mixin text-ellipsis--muti($lines: 2) {
  @if ($lines == 1) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  } @else {
    display: -webkit-box;
    /*! autoprefixer: ignore next */
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $lines;
    overflow: hidden;
  }
}

@mixin flex-center() {
  display: flex;
  align-items: center;
  justify-content: center;
}

@mixin flex-vertical-center($height: auto) {
  display: flex;
  align-items: center;
  height: $height;
}

@mixin flex-horizontal-center($width) {
  display: flex;
  justify-content: center;
  width: $width;
}

@mixin div--webkit--scrollbar($color: #f7f7f7) {
  &::-webkit-scrollbar-track {
    border-radius: 3px;
    background-color: #f7f7f7;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background-color: $color;
  }
  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background-color: #f7f7f7;
  }
}
